package com.shixu.framework.plugins.security.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.shixu.framework.plugins.security.UserNotAvailableException;
import com.shixu.framework.plugins.security.UserNotFoundException;
import com.shixu.framework.plugins.security.WrongPasswordException;
import com.shixu.framework.plugins.security.WrongValidateCodeException;
import com.shixu.framework.plugins.security.domain.SecurityToken;

public interface ISecurityService {

	SecurityToken login
		(HttpServletResponse response, String[] usernames, String passwd, boolean rememberme)
		throws UserNotFoundException, UserNotAvailableException, WrongPasswordException;
	
	SecurityToken login(HttpServletRequest request, HttpServletResponse response, String[] usernames,
			String passwd, boolean rememberme, String validateCode)
			throws UserNotFoundException, UserNotAvailableException,
			WrongPasswordException, WrongValidateCodeException;
	
	void logout(HttpServletResponse response);

	
}
